package cn.oppexecise;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * @author SWJ
 * @create 2021-06-17 16:21
 * 字符输出流
 */
public class TestWriter {
    public static void main(String[] args) {
method();
    }

    private static void method() {
        Writer w=null;
        try {
            w=new BufferedWriter
                    (new FileWriter("D:\\read\\1.txt",true));
            w.write(60);
            w.write("abs");

        }catch (Exception e){
            e.printStackTrace();
        }finally {
            try {
                w.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
